<!DOCTYPE html>
<html lang="cn">
<head>
    <meta charset="UTF-8">
    <title>禁止复制粘贴</title>
</head>
<body>
<label>
    请输入答案：<input type="text" onpaste="function1()"><br>
    参考答案：123456
</label>
<script type="text/javascript">
    document.body.oncopy = function () {
        window.alert("不允许复制本网页！");
        window.event.preventDefault();
    }
    
    function function1(){
        window.alert("请自觉！");
        window.event.preventDefault();
    }
</script>
</body>
</html>